Optimal. Leaf size=49 \[ \frac {c \cos (e+f x) \log (1+\sin (e+f x))}{f \sqrt {a+a \sin (e+f x)} \sqrt {c-c \sin (e+f x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.07, antiderivative size = 49, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 3, integrand size = 30, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.100, Rules used = {2816, 2746, 31}
\begin {gather*} \frac {c \cos (e+f x) \log (\sin (e+f x)+1)}{f \sqrt {a \sin (e+f x)+a} \sqrt {c-c \sin (e+f x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 31
Rule 2746
Rule 2816
Rubi steps
\begin {align*} \int \frac {\sqrt {c-c \sin (e+f x)}}{\sqrt {a+a \sin (e+f x)}} \, dx &=\frac {(a c \cos (e+f x)) \int \frac {\cos (e+f x)}{a+a \sin (e+f x)} \, dx}{\sqrt {a+a \sin (e+f x)} \sqrt {c-c \sin (e+f x)}}\\ &=\frac {(c \cos (e+f x)) \text {Subst}\left (\int \frac {1}{a+x} \, dx,x,a \sin (e+f x)\right )}{f \sqrt {a+a \sin (e+f x)} \sqrt {c-c \sin (e+f x)}}\\ &=\frac {c \cos (e+f x) \log (1+\sin (e+f x))}{f \sqrt {a+a \sin (e+f x)} \sqrt {c-c \sin (e+f x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 0.67, size = 118, normalized size = 2.41 \begin {gather*} -\frac {\sqrt {2} \left (i+e^{i (e+f x)}\right ) \left (f x+2 i \log \left (i+e^{i (e+f x)}\right )\right ) \sqrt {c-c \sin (e+f x)}}{\left (-i+e^{i (e+f x)}\right ) \sqrt {-i a e^{-i (e+f x)} \left (i+e^{i (e+f x)}\right )^2} f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(104\) vs.
\(2(45)=90\).
time = 19.70, size = 105, normalized size = 2.14
method | result | size |
default | \(\frac {\left (-1+\cos \left (f x +e \right )-\sin \left (f x +e \right )\right ) \sqrt {-c \left (\sin \left (f x +e \right )-1\right )}\, \left (\ln \left (\frac {2}{\cos \left (f x +e \right )+1}\right )-2 \ln \left (-\frac {-1+\cos \left (f x +e \right )-\sin \left (f x +e \right )}{\sin \left (f x +e \right )}\right )\right )}{f \sqrt {a \left (1+\sin \left (f x +e \right )\right )}\, \left (-1+\cos \left (f x +e \right )+\sin \left (f x +e \right )\right )}\) | \(105\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.52, size = 68, normalized size = 1.39 \begin {gather*} -\frac {\frac {2 \, \sqrt {c} \log \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + 1\right )}{\sqrt {a}} - \frac {\sqrt {c} \log \left (\frac {\sin \left (f x + e\right )^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + 1\right )}{\sqrt {a}}}{f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\sqrt {- c \left (\sin {\left (e + f x \right )} - 1\right )}}{\sqrt {a \left (\sin {\left (e + f x \right )} + 1\right )}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 231 vs.
\(2 (49) = 98\).
time = 0.58, size = 231, normalized size = 4.71 \begin {gather*} \frac {\sqrt {2} \sqrt {c} {\left (\frac {\sqrt {2} \log \left ({\left | -\frac {\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1}{\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 1} - \frac {\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 1}{\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1} + 2 \right |}\right ) \mathrm {sgn}\left (\sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )}{\sqrt {a} \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )} - \frac {\sqrt {2} \log \left ({\left | -\frac {\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1}{\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 1} - \frac {\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 1}{\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1} - 2 \right |}\right ) \mathrm {sgn}\left (\sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )}{\sqrt {a} \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )}\right )}}{2 \, f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.02 \begin {gather*} \int \frac {\sqrt {c-c\,\sin \left (e+f\,x\right )}}{\sqrt {a+a\,\sin \left (e+f\,x\right )}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________